bitkeeper revision 1.1678 (42a405d8raiThtAq9NRXuuFg6ur1qA)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 6 Jun 2005 08:14:16 +0000 (08:14 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 6 Jun 2005 08:14:16 +0000 (08:14 +0000)
Attached patch fixes FP initialization bug with x86-64 xenlinux.=20

With this patch, # of testcase failures with LTP is < 5 (out of 800),
almost same results as the native x86-64 Linux. The other two patches
for LTP are coming soon; with these, all the testcases will pass (except
the ones that fail on the native x86-64 Linux).

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup64.c
linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h

index 32b813661f477e2fbcf314821924ac091041eed2..9b9a974337008e73f9664044567b0fe9a33e699a 100644 (file)
@@ -336,9 +336,7 @@ void __init cpu_init (void)
        CD(0); CD(1); CD(2); CD(3); /* no db4 and db5 */; CD(6); CD(7);
 
 #undef CD
-#if 0
        fpu_init(); 
-#endif
 
 #ifdef CONFIG_NUMA
        numa_add_cpu(cpu);
index 7c70eac4259123cc336d816069db86162cabf6c9..8d4d9e32ac293664933a37dd4546d6ca3ea67482 100644 (file)
@@ -147,12 +147,12 @@ struct alt_instr {
 #define clts() (HYPERVISOR_fpu_taskswitch(0))
 static inline unsigned long read_cr0(void)
 { 
-        BUG();
+       return 0;
 } 
 
 static inline void write_cr0(unsigned long val) 
 { 
-        BUG();
+       /* Ignore, Linux tries to clear TS and EM */
 } 
 
 static inline unsigned long read_cr3(void)